<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>学生管理</title>
</head>
<body>
	<%@include file="admindex.jsp"%>
	<table class="table table-dark"
		style="margin-left: 15%; margin-right: 15%; width: 70%;">
		<thead>
			<tr>
				<th scope="col">学号</th>
				<th scope="col">姓名</th>
				<th scope="col">性别</th>
				<th scope="col">专业</th>
				<th scope="col">操作</th>
			</tr>
		</thead>
		<tbody>
			<c:forEach var="s" items="${sPage.list }">
				<tr>
					<th scope="row">${s.sno }</th>
					<td>${s.sname }</td>
					<td>${s.ssex }</td>
					<td>${s.specialities }</td>
					<td><a href="delstudent?id=${s.id }" class="btn btn-primary btn-lg active" role="button"
			aria-pressed="true" style="background-color: #c00;border-color: #c00;">删除</a></td>
				</tr>
			</c:forEach>
		</tbody>
	</table>

	<nav aria-label="Page navigation example">
	<ul class="pagination" style="margin-top: 20px; margin-left: 40%;">
		<c:if test="${sPage!=null }">
			<c:if test="${sPage.pageNum>1 }">
				<li class="page-item"><a class="page-link"
					href="findAllStudent?pageNum=1&&pageSize=${sPage.pageSize }">首页</a></li>
				<li class="page-item"><a class="page-link"
					href="findAllStudent?pageNum=${sPage.prePageNum}&&pageSize=${sPage.pageSize }">${sPage.prePageNum}</a></li>
			</c:if>
			<li class="page-item"><a class="page-link">${sPage.pageNum}</a></li>
			<c:if test="${sPage.pageNum<sPage.totalPageNum }">
				<li class="page-item"><a class="page-link"
					href="findAllStudent?pageNum=${sPage.nextPageNum}&&pageSize=${sPage.pageSize }">${sPage.nextPageNum}</a></li>
				<li class="page-item"><a class="page-link"
					href="findAllStudent?pageNum=${sPage.totalPageNum}&&pageSize=${sPage.pageSize }">尾页</a></li>
			</c:if>
		</c:if>
		<p class="lead" style="margin-left: 33%;">当前页：第${sPage.pageNum }页/共${sPage.totalPageNum }页</p>
		<a href="addstudent.jsp" class="btn btn-primary btn-lg active" role="button"
			aria-pressed="true">添加学生</a>
	</ul>
	</nav>
</body>
</html>